module ProcessQueue.Acc exposing (..)
import ProcessQueue.Model exposing (..)
-- CPU线程队列计步器

inc_acc : Acc -> Acc
inc_acc acc = {acc | step = (.step) acc + 1}

is_max : Acc -> Bool
is_max acc = .step acc >= .max_step acc

clear_acc : Acc -> Acc
clear_acc acc = {acc | step = 0}

show : Acc -> String
show acc =
  "Acc: {step=" ++ ((.step >> toString) acc) ++ ",max_step=" ++ ((.max_step >> toString) acc)